#include<stdio.h>
#include<string.h>

// code -opt1/-opt2/-opt3
int main(int argc, char *argv[])
{
    if(argc != 2)
    {
        printf("Usage: code opt\n");
        return 1;
    }

    if(strcmp(argv[1],"-opt1") == 0)
    {
        printf("功能1\n");
    }
    else if(strcmp(argv[2],"-opt2") == 0)
    {
        printf("功能2\n");
    }
    else if(strcmp(argv[3],"-opt3") == 0)
    {
        printf("功能3\n");
    }
    else
    {
        printf("默认功能\n");
    }





    //printf("argc: %d\n",argc);
    //for(int i = 0; i < argc; i++)
    //{
    //    printf("argv[%d]: %s\n", i, argv[i]);
    //}
    return 0;
}
